3.1.46 \(\int \frac {\csc ^2(c+d x)}{a-a \sin ^2(c+d x)} \, dx\) [46]

Optimal. Leaf size=28 \[ -\frac {\cot (c+d x)}{a d}+\frac {\tan (c+d x)}{a d} \]

[Out]

-cot(d*x+c)/a/d+tan(d*x+c)/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3254, 2700, 14} \begin {gather*} \frac {\tan (c+d x)}{a d}-\frac {\cot (c+d x)}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2/(a - a*Sin[c + d*x]^2),x]

[Out]

-(Cot[c + d*x]/(a*d)) + Tan[c + d*x]/(a*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\csc ^2(c+d x)}{a-a \sin ^2(c+d x)} \, dx &=\frac {\int \csc ^2(c+d x) \sec ^2(c+d x) \, dx}{a}\\ &=\frac {\text {Subst}\left (\int \frac {1+x^2}{x^2} \, dx,x,\tan (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{a d}\\ &=-\frac {\cot (c+d x)}{a d}+\frac {\tan (c+d x)}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 16, normalized size = 0.57 \begin {gather*} -\frac {2 \cot (2 (c+d x))}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2/(a - a*Sin[c + d*x]^2),x]

[Out]

(-2*Cot[2*(c + d*x)])/(a*d)

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 25, normalized size = 0.89

method result size
derivativedivides \(\frac {\tan \left (d x +c \right )-\frac {1}{\tan \left (d x +c \right )}}{d a}\) \(25\)
default \(\frac {\tan \left (d x +c \right )-\frac {1}{\tan \left (d x +c \right )}}{d a}\) \(25\)
risch \(-\frac {4 i}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}\) \(36\)
norman \(\frac {\frac {1}{2 a d}-\frac {3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) \(75\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2/(a-a*sin(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(tan(d*x+c)-1/tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 28, normalized size = 1.00 \begin {gather*} \frac {\frac {\tan \left (d x + c\right )}{a} - \frac {1}{a \tan \left (d x + c\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

(tan(d*x + c)/a - 1/(a*tan(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 36, normalized size = 1.29 \begin {gather*} -\frac {2 \, \cos \left (d x + c\right )^{2} - 1}{a d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

-(2*cos(d*x + c)^2 - 1)/(a*d*cos(d*x + c)*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\csc ^{2}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} - 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2/(a-a*sin(d*x+c)**2),x)

[Out]

-Integral(csc(c + d*x)**2/(sin(c + d*x)**2 - 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 19, normalized size = 0.68 \begin {gather*} -\frac {2}{a d \tan \left (2 \, d x + 2 \, c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2),x, algorithm="giac")

[Out]

-2/(a*d*tan(2*d*x + 2*c))

________________________________________________________________________________________

Mupad [B]
time = 13.50, size = 17, normalized size = 0.61 \begin {gather*} -\frac {2\,\mathrm {cot}\left (2\,c+2\,d\,x\right )}{a\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)^2*(a - a*sin(c + d*x)^2)),x)

[Out]

-(2*cot(2*c + 2*d*x))/(a*d)

________________________________________________________________________________________